package(default_visibility = ["//visibility:public"])

load("@io_bazel_rules_sass//:defs.bzl", "sass_binary")
load(
    "//tools:defaults.bzl",
    "markdown_to_html",
    "ng_module",
    "ng_test_library",
    "ng_web_test_suite",
)

ng_module(
    name = "scrolling",
    srcs = glob(
        ["**/*.ts"],
        exclude = ["**/*.spec.ts"],
    ),
    assets = [":virtual-scroll-viewport.css"] + glob(["**/*.html"]),
    module_name = "@angular/cdk/scrolling",
    deps = [
        "//src/cdk/bidi",
        "//src/cdk/coercion",
        "//src/cdk/collections",
        "//src/cdk/platform",
        "@npm//@angular/common",
        "@npm//@angular/core",
        "@npm//rxjs",
    ],
)

sass_binary(
    name = "virtual_scroll_viewport_scss",
    src = "virtual-scroll-viewport.scss",
)

ng_test_library(
    name = "unit_test_sources",
    srcs = glob(
        ["**/*.spec.ts"],
        exclude = ["**/*.e2e.spec.ts"],
    ),
    deps = [
        ":scrolling",
        "//src/cdk/bidi",
        "//src/cdk/collections",
        "//src/cdk/testing",
        "@npm//rxjs",
    ],
)

ng_web_test_suite(
    name = "unit_tests",
    deps = [":unit_test_sources"],
)

markdown_to_html(
    name = "overview",
    srcs = [":scrolling.md"],
)

filegroup(
    name = "source-files",
    srcs = glob(["**/*.ts"]),
)
